import request from '@/utils/request.js'


//配置表达式
export function getList(data) {
  return request({
    url: `/mes/bpm/getconditionlist`,
    method: 'post',
    data
  })
}

export function getItem(id) {
  return request({
    url: `/mes/bpm/getconditionbyid`,
    method: 'get',
    params: {
      id
    }
  })
}

export function update(data) {
  return request({
    url: `/mes/bpm/updatecondition`,
    method: 'post',
    data
  })
}

export function add(data) {
  return request({
    url: `/mes/bpm/addcondition`,
    method: 'post',
    data
  })
}


export function del(id) {
  return request({
    url: `/mes/bpm/delConditionbyid`,
    method: 'get',
    params:{id}
  })
}


//获取线段和节点
export function getJsonbyBnpmId(data) {
  return request({
    url: '/mes/bpm/getpipelineandlinelist' ,
    method: 'get',
    params: {
      ...data,
      bpmId: data.bpmId
    }
  })
}
